﻿using DotNetty.Framework.BaseModel;
using DotNetty.Framework.BaseTriggers;
using System;
using System.Threading.Tasks;

namespace iTool_Cetector.Controllers
{
    [Route("{worker}")]
    public class DockerWorker
    {
        [Post("ts/{container}")]
        public Task<string> Status(string container, string id, int age, DateTime dateTime, AbstractHttpContext httpContext)
        {
            return Task.FromResult(container);
        }

        [Post("tvoid/{container}")]
        public Task Status1(string container, string id, int age, DateTime dateTime, AbstractHttpContext httpContext)
        {
            return Task.CompletedTask;
        }

        [Post("void/{container}")]
        public void Status2(string container, string id, int age, DateTime dateTime, AbstractHttpContext httpContext)
        {
        }

        [Post("ex/{container}")]
        public void Status22(string container, string id, int age, DateTime dateTime, AbstractHttpContext httpContext)
        {
            throw new Exception(container);
        }

        [Get("{container}/get")]
        public string Get123(string container)
        {
            return container + "get";
        }

        [Get]
        public string Get123123123()
        {
            return "get";
        }

        private string g1()
        {
            return "get";
        }

        protected string g2()
        {
            return "get";
        }
    }

}
